package com.gollum.jpa.domain;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * @author Herther
 * @version 1.0.0
 * @ClassName AbstractBaseEntity.java
 * @Description 封装抽象BaseEntity
 * @createTime 2022年06月24日 10:30:00
 */
@MappedSuperclass
public class AbstractBaseEntity implements Serializable {

    @Id
    @GenericGenerator(name = "snowFlakeIdGenerator", strategy = "com.gollum.jpa.util.strategy.SnowFlakeIdGenerator")
    @GeneratedValue(generator = "snowFlakeIdGenerator")
    @Column(name = "id",length = 50)
    private Long id;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
